Imports BusinessLayer
Imports EntityLayer
Imports System.Data

Partial Class VistaSalidaProducto
    Inherits System.Web.UI.Page


    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then

            Dim intNumGuia As Integer
            intNumGuia = CInt(Request.QueryString("strCodigo"))

            Dim dt As DataTable
            dt = GuiaSalidaBL.ListarxCodigo(intNumGuia).Tables(0)

            txtNumero.Text = dt.Rows(0)(0).ToString
            txtFecha.Text = dt.Rows(0)(1).ToString
            txtNumeroPedido.Text = dt.Rows(0)(2).ToString
            txtSolicitante.Text = dt.Rows(0)(5).ToString
            txtArea.Text = dt.Rows(0)(6).ToString

            dgDatos.DataSource = DetalleGuiaSalidaBL.ListarxCodigo(intNumGuia).Tables(0)
            dgDatos.DataBind()
        End If
    End Sub

    Protected Sub btnCancelar_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Response.Redirect("ListaSalidaProducto.aspx")
    End Sub
End Class
